package com.telit.firecommand.dao;

import com.telit.firecommand.entity.CommHistoryFire;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.Date;

@Repository
public interface CommHistoryFireDao {
    int deleteByPrimaryKey(Long id);

    int insert(CommHistoryFire record);

    int insertSelective(CommHistoryFire record);

    CommHistoryFire selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(CommHistoryFire record);

    int updateByPrimaryKey(CommHistoryFire record);


    /**
     * 根据火情id查询
     * @param fireId
     * @return
     */
    CommHistoryFire queryByFireId(@Param("fireId") Long fireId);

    /**
     * 通过火情id删除数据
     * @param fireId
     */
    void deleteByFireId(@Param("fireId")Long fireId);

    /**
     * 根据火情id查询扑灭时间
     * @param fireId
     * @return
     */
    Date queryEndTime(@Param("fireId")Long fireId);

}